package com.tacorpus.ui.model;

import java.util.List;

public class Glossary implements Comparable<Glossary>{
	public List<Glossary> container;
	public String japanese;
	public String english;
	public Glossary(List<Glossary> container,String japanese,String english){
		this.container = container;
		this.japanese = japanese;
		this.english = english;
	}
	public int getIndex(){
		return container.indexOf(this) + 1;
	}
	
	public int compareTo(Glossary o) {
		return this.getIndex() > o.getIndex() ? 1 : this.getIndex() == o.getIndex() ? 0 : -1;
	}
}
